#! /usr/bin/env bash
RST2HTML=rst2html
if !  ( which $RST2HTML > /dev/null 2>&1 ) ; then
    RST2HTML=rst2html.py
    if ! ( which $RST2HTML > /dev/null 2>&1 ) ; then
	echo "Could not find rst2html executable on the PATH."
	exit -1
    fi
fi
    
for f in rest/*.txt ; do
    htmlname=`basename $f .txt`.html
    $RST2HTML $f html/$htmlname
done